package com.yidian.server.user;

import com.yidian.entity.PageResult;
import com.yidian.pojo.user.User;

import java.util.List;
import java.util.Map;

/**
 * @author whb
 * @create 2021-07-08 16:54
 * @desciption 用户业务Service接口类
 */
public interface UserService {
    public List<User> findAll();

    public PageResult<User> findPage(int page, int size);

    public List<User> findList(Map<String, Object> searchMap);

    public PageResult<User> findPage(Map<String, Object> searchMap, int page, int size);

    public User findById(String username);

    public void add(User user);

    public void update(User user);

    public void delete(String username);

    /**
     * 发送短信验证码
     * @param phoneNo
     */
    public void sendSms(String phoneNo);

    /**
     * 注册用户
     * @param user
     * @param smsCode
     */
    public void register(User user,String smsCode);
}
